<?php
/**
 * Created by PhpStorm.
 * User: lili
 * Date: 2018/11/17
 * Time: 17:02
 */

namespace app\index\validate;


use think\Validate;

class Check extends Validate
{
   protected $rule = [
       'uid' => 'require|number',
       'pid' => 'require|number',
       'itemid' => 'require|number',
       'date' => 'require|date',
       'value' => 'require|float',
   ];


    protected $message  =   [
        'uid.require' => '用户id必须',
        'pid.require' => '一级id必须',
        'itemid.require' => '二级id必须',
        'date.require' => '时间必须',
        'value.require' => '值必须',
        'pid.number' => '一级id必须数字',
        'uid.number' => '用户id必须数字',
        'itemid.number' => '二级id必须数字',
        'date.date' => '时间必须时间格式',
        'value.float' => '值必须浮点数',

    ];

}